﻿<Window x:Class="BackupGUI.ProjectSettings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ValueConverter="clr-namespace:Backup.ValueConverter" 
    Title="Sicherung" Height="300" Width="640" WindowStyle="SingleBorderWindow" Closing="Window_Closing" Loaded="Window_Loaded"  Background="{DynamicResource ResourceKey=WindowBackground}">
    <Grid>
        <DockPanel>
            <StackPanel DockPanel.Dock="Bottom"  Orientation="Horizontal" Background="{DynamicResource ResourceKey=PanelBackground}">
                <Button Name="btnBackup" Click="btnBackup_Click">Sicherung starten</Button>
                <Button Name="btnHide" Click="btnHide_Click" IsCancel="True">Schließen</Button>
            </StackPanel>
            <StackPanel DockPanel.Dock="Bottom"  Orientation="Horizontal">
                <StackPanel.Resources>
                    <Style TargetType="{x:Type RadioButton}">
                        <Style.Setters>
                            <Setter Property="Margin" Value="5"/>
                        </Style.Setters>
                    </Style>
                   
                        <ValueConverter:Bool2Enum x:Key="Bool2Enum"/>
                    
                </StackPanel.Resources>
                <Label>Ausführung:</Label>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Monday}">Mo</RadioButton>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Tuesday}">Di</RadioButton>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Wednesday}">Mi</RadioButton>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Thursday}">Do</RadioButton>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Friday}">Fr</RadioButton>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Saturday}">Sa</RadioButton>
                <RadioButton IsChecked="{Binding ScheduleDay, Converter={StaticResource Bool2Enum}, ConverterParameter=Sunday}">So</RadioButton>
                <TextBox MinWidth="50" Text="{Binding ScheduleTime}"/>
                <CheckBox>System reaktivieren</CheckBox>
            </StackPanel>
            <StackPanel DockPanel.Dock="Bottom"  Orientation="Horizontal" Background="{DynamicResource ResourceKey=PanelBackground}">
                <Button Name="btnAdd" Click="button1_Click">Hinzufügen</Button>
                <Button Name="btnRemove" Click="button2_Click">Entfernen</Button>
                <Button Name="btnEdit" Click="btnEdit_Click" Foreground="Black">Bearbeiten</Button>
            </StackPanel> 

            <ListView Margin="5,5,5,5" Name="lstSource" ItemsSource="{Binding Tasks}" MouseDoubleClick="lstSource_MouseDoubleClick">
                <ListView.View>
                    <GridView x:Name="gridSource">
                        <GridViewColumn DisplayMemberBinding="{Binding SourceRoot}" Width="200" Header="Pfad" />
                        <GridViewColumn DisplayMemberBinding="{Binding Recursive}" Width="100" Header="Unterverzeichnisse"/>
                        <GridViewColumn DisplayMemberBinding="{Binding ExcludeString}" Width="100" Header="Außer"/>
                        <GridViewColumn DisplayMemberBinding="{Binding IncludeString}" Width="200" Header="Enthält"/>
                    </GridView>
                </ListView.View>
            </ListView>
        </DockPanel>
    </Grid>
</Window>
